<!DOCTYPE HTML>
<html lang="en" >
    <!-- Start book 美多商城 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>容器化方案Docker | 美多商城</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../goods/prepare-goods-data/implementation-file-storage-download.html" />
    
    
    <link rel="prev" href="../../goods/prepare-goods-data/fastdfs.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="6.2.2"
        data-chapter-title="容器化方案Docker"
        data-filepath="goods/prepare-goods-data/docker-basics.md"
        data-basepath="../.."
        data-revision="Fri Mar 08 2019 10:51:59 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        美多商城
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="project-preparation.html">
            
                
                    <a href="../../project-preparation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        项目准备
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="project-preparation/project-introduce.html">
            
                
                    <a href="../../project-preparation/project-introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        美多商城项目介绍
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="project-preparation/project-introduce/project-demand-analysis.html">
            
                
                    <a href="../../project-preparation/project-introduce/project-demand-analysis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.1.</b>
                        
                        项目需求分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="project-preparation/project-introduce/project-architecture-design.html">
            
                
                    <a href="../../project-preparation/project-introduce/project-architecture-design.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.2.</b>
                        
                        项目架构设计
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="project-preparation/project-create-configuration.html">
            
                
                    <a href="../../project-preparation/project-create-configuration.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        工程创建和配置
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="project-preparation/project-create-configuration/create-project.html">
            
                
                    <a href="../../project-preparation/project-create-configuration/create-project.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.1.</b>
                        
                        创建工程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="project-preparation/project-create-configuration/development-environment.html">
            
                
                    <a href="../../project-preparation/project-create-configuration/development-environment.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.2.</b>
                        
                        配置开发环境
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="project-preparation/project-create-configuration/jinja2-template.html">
            
                
                    <a href="../../project-preparation/project-create-configuration/jinja2-template.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.3.</b>
                        
                        配置Jinja2模板引擎
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="project-preparation/project-create-configuration/mysql.html">
            
                
                    <a href="../../project-preparation/project-create-configuration/mysql.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.4.</b>
                        
                        配置MySQL数据库
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="project-preparation/project-create-configuration/redis.html">
            
                
                    <a href="../../project-preparation/project-create-configuration/redis.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.5.</b>
                        
                        配置Redis数据库
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="project-preparation/project-create-configuration/log.html">
            
                
                    <a href="../../project-preparation/project-create-configuration/log.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.6.</b>
                        
                        配置工程日志
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="project-preparation/project-create-configuration/static.html">
            
                
                    <a href="../../project-preparation/project-create-configuration/static.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.7.</b>
                        
                        配置前端静态文件
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="user-register.html">
            
                
                    <a href="../../user-register.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        用户注册
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="user-register/prepare-user-app.html">
            
                
                    <a href="../../user-register/prepare-user-app.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        展示用户注册界面
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1.1" data-path="user-register/prepare-user-app/create-user-app.html">
            
                
                    <a href="../../user-register/prepare-user-app/create-user-app.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.1.</b>
                        
                        创建用户模块应用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.2" data-path="user-register/prepare-user-app/add-module-path.html">
            
                
                    <a href="../../user-register/prepare-user-app/add-module-path.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.2.</b>
                        
                        追加导包路径
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.1.3" data-path="user-register/prepare-user-app/show-user-register-html.html">
            
                
                    <a href="../../user-register/prepare-user-app/show-user-register-html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.3.</b>
                        
                        展示用户注册界面
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="user-register/user-model.html">
            
                
                    <a href="../../user-register/user-model.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        用户模型类
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="user-register/user-model/custom-user-model.html">
            
                
                    <a href="../../user-register/user-model/custom-user-model.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.1.</b>
                        
                        定义用户模型类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="user-register/user-model/migrate-custom-user-model.html">
            
                
                    <a href="../../user-register/user-model/migrate-custom-user-model.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.2.</b>
                        
                        迁移用户模型类
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="user-register/user-register.html">
            
                
                    <a href="../../user-register/user-register.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        用户注册业务实现
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.3.1" data-path="user-register/user-register/user-register-analyze.html">
            
                
                    <a href="../../user-register/user-register/user-register-analyze.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.1.</b>
                        
                        用户注册业务逻辑分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.2" data-path="user-register/user-register/user-register-project-definition.html">
            
                
                    <a href="../../user-register/user-register/user-register-project-definition.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.2.</b>
                        
                        用户注册接口设计和定义
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.3" data-path="user-register/user-register/user-register-front-logic.html">
            
                
                    <a href="../../user-register/user-register/user-register-front-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.3.</b>
                        
                        用户注册前端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.4" data-path="user-register/user-register/user-register-end-logic.html">
            
                
                    <a href="../../user-register/user-register/user-register-end-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.4.</b>
                        
                        用户注册后端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.5" data-path="user-register/user-register/user-register-keep-state.html">
            
                
                    <a href="../../user-register/user-register/user-register-keep-state.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.5.</b>
                        
                        状态保持
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.6" data-path="user-register/user-register/user-register-username-repetition.html">
            
                
                    <a href="../../user-register/user-register/user-register-username-repetition.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.6.</b>
                        
                        用户名重复注册
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3.7" data-path="user-register/user-register/user-register-mobile-repetition.html">
            
                
                    <a href="../../user-register/user-register/user-register-mobile-repetition.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.7.</b>
                        
                        手机号重复注册
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="user-verification-code.html">
            
                
                    <a href="../../user-verification-code.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        验证码
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="user-verification-code/image-verification-code.html">
            
                
                    <a href="../../user-verification-code/image-verification-code.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        图形验证码
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1.1" data-path="user-verification-code/image-verification-code/image-verification-code-analyze.html">
            
                
                    <a href="../../user-verification-code/image-verification-code/image-verification-code-analyze.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.1.</b>
                        
                        图形验证码逻辑分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.1.2" data-path="user-verification-code/image-verification-code/image-verification-code-project-definition.html">
            
                
                    <a href="../../user-verification-code/image-verification-code/image-verification-code-project-definition.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.2.</b>
                        
                        图形验证码接口设计和定义
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.1.3" data-path="user-verification-code/image-verification-code/image-verification-code-end-logic.html">
            
                
                    <a href="../../user-verification-code/image-verification-code/image-verification-code-end-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.3.</b>
                        
                        图形验证码后端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.1.4" data-path="user-verification-code/image-verification-code/image-verification-code-front-logic.html">
            
                
                    <a href="../../user-verification-code/image-verification-code/image-verification-code-front-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.4.</b>
                        
                        图形验证码前端逻辑
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="user-verification-code/sms-verification-code.html">
            
                
                    <a href="../../user-verification-code/sms-verification-code.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        短信验证码
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.2.1" data-path="user-verification-code/sms-verification-code/sms-verification-code-analyze.html">
            
                
                    <a href="../../user-verification-code/sms-verification-code/sms-verification-code-analyze.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.1.</b>
                        
                        短信验证码逻辑分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2.2" data-path="user-verification-code/sms-verification-code/rong-lian-yun.html">
            
                
                    <a href="../../user-verification-code/sms-verification-code/rong-lian-yun.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.2.</b>
                        
                        容联云通讯短信平台
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2.3" data-path="user-verification-code/sms-verification-code/sms-verification-code-end-logic.html">
            
                
                    <a href="../../user-verification-code/sms-verification-code/sms-verification-code-end-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.3.</b>
                        
                        短信验证码后端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2.4" data-path="user-verification-code/sms-verification-code/sms-verification-code-front-logic.html">
            
                
                    <a href="../../user-verification-code/sms-verification-code/sms-verification-code-front-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.4.</b>
                        
                        短信验证码前端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2.5" data-path="user-verification-code/sms-verification-code/add-register-logic.html">
            
                
                    <a href="../../user-verification-code/sms-verification-code/add-register-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.5.</b>
                        
                        补充注册时短信验证逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2.6" data-path="user-verification-code/sms-verification-code/sms-verification-code-often.html">
            
                
                    <a href="../../user-verification-code/sms-verification-code/sms-verification-code-often.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.6.</b>
                        
                        避免频繁发送短信验证码
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2.7" data-path="user-verification-code/sms-verification-code/sms-verification-code-redis-pipeline.html">
            
                
                    <a href="../../user-verification-code/sms-verification-code/sms-verification-code-redis-pipeline.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.7.</b>
                        
                        pipeline操作Redis数据库
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="user-verification-code/celery-async-send-code.html">
            
                
                    <a href="../../user-verification-code/celery-async-send-code.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        异步方案RabbitMQ和Celery
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1" data-path="user-verification-code/celery-async-send-code/rabiitmq-introduce.html">
            
                
                    <a href="../../user-verification-code/celery-async-send-code/rabiitmq-introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.1.</b>
                        
                        RabbitMQ介绍和使用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3.2" data-path="user-verification-code/celery-async-send-code/celery-introduce.html">
            
                
                    <a href="../../user-verification-code/celery-async-send-code/celery-introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.2.</b>
                        
                        Celery介绍和使用
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="user-login.html">
            
                
                    <a href="../../user-login.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        用户登录
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="user-login/account-login.html">
            
                
                    <a href="../../user-login/account-login.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        账号登录
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1.1" data-path="user-login/account-login/username-login.html">
            
                
                    <a href="../../user-login/account-login/username-login.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.1.</b>
                        
                        用户名登录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.1.2" data-path="user-login/account-login/many-account-login.html">
            
                
                    <a href="../../user-login/account-login/many-account-login.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.2.</b>
                        
                        多账号登录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.1.3" data-path="user-login/account-login/index-show-username.html">
            
                
                    <a href="../../user-login/account-login/index-show-username.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.3.</b>
                        
                        首页用户名展示
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.1.4" data-path="user-login/account-login/logout.html">
            
                
                    <a href="../../user-login/account-login/logout.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.4.</b>
                        
                        退出登录
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.1.5" data-path="user-login/account-login/islogin.html">
            
                
                    <a href="../../user-login/account-login/islogin.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.5.</b>
                        
                        判断用户是否登录
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="user-login/qq-login.html">
            
                
                    <a href="../../user-login/qq-login.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        QQ登录
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.2.1" data-path="user-login/qq-login/qq-login-document.html">
            
                
                    <a href="../../user-login/qq-login/qq-login-document.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.1.</b>
                        
                        QQ登录开发文档
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2.2" data-path="user-login/qq-login/qq-login-model.html">
            
                
                    <a href="../../user-login/qq-login/qq-login-model.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.2.</b>
                        
                        定义QQ登录模型类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2.3" data-path="user-login/qq-login/qq-login-tool.html">
            
                
                    <a href="../../user-login/qq-login/qq-login-tool.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.3.</b>
                        
                        QQ登录工具QQLoginTool
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2.4" data-path="user-login/qq-login/qq-login-oauth-openid.html">
            
                
                    <a href="../../user-login/qq-login/qq-login-oauth-openid.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.4.</b>
                        
                        OAuth2.0认证获取openid
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2.5" data-path="user-login/qq-login/qq-login-bind-user.html">
            
                
                    <a href="../../user-login/qq-login/qq-login-bind-user.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.5.</b>
                        
                        openid是否绑定用户的处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2.6" data-path="user-login/qq-login/qq-login-bind-user-implementation.html">
            
                
                    <a href="../../user-login/qq-login/qq-login-bind-user-implementation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.6.</b>
                        
                        openid绑定用户实现
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="user-center.html">
            
                
                    <a href="../../user-center.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        用户中心
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="user-center/user-info.html">
            
                
                    <a href="../../user-center/user-info.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        用户基本信息
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1.1" data-path="user-center/user-info/user-info-logic.html">
            
                
                    <a href="../../user-center/user-info/user-info-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.1.</b>
                        
                        用户基本信息逻辑分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.1.2" data-path="user-center/user-info/user-info-end-logic.html">
            
                
                    <a href="../../user-center/user-info/user-info-end-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.2.</b>
                        
                        查询并渲染用户基本信息
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="user-center/add-verification-email.html">
            
                
                    <a href="../../user-center/add-verification-email.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        添加和验证邮箱
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.2.1" data-path="user-center/add-verification-email/add-email-end-logic.html">
            
                
                    <a href="../../user-center/add-verification-email/add-email-end-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.1.</b>
                        
                        添加邮箱后端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2.2" data-path="user-center/add-verification-email/send-email-setting.html">
            
                
                    <a href="../../user-center/add-verification-email/send-email-setting.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.2.</b>
                        
                        Django发送邮件的配置
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2.3" data-path="user-center/add-verification-email/send-verification-email.html">
            
                
                    <a href="../../user-center/add-verification-email/send-verification-email.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.3.</b>
                        
                        发送邮箱验证邮件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2.4" data-path="user-center/add-verification-email/verification-email-end-logic.html">
            
                
                    <a href="../../user-center/add-verification-email/verification-email-end-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.4.</b>
                        
                        验证邮箱后端逻辑
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="user-center/addresses-manage.html">
            
                
                    <a href="../../user-center/addresses-manage.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        收货地址
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.3.1" data-path="user-center/areas.html">
            
                
                    <a href="../../user-center/areas.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.1.</b>
                        
                        省市区三级联动
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3.2" data-path="user-center/create-address.html">
            
                
                    <a href="../../user-center/create-address.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.2.</b>
                        
                        新增地址前后端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3.3" data-path="user-center/query-address.html">
            
                
                    <a href="../../user-center/query-address.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.3.</b>
                        
                        展示地址前后端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3.4" data-path="user-center/update-address.html">
            
                
                    <a href="../../user-center/update-address.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.4.</b>
                        
                        修改地址前后端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3.5" data-path="user-center/delete-address.html">
            
                
                    <a href="../../user-center/delete-address.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.5.</b>
                        
                        删除地址前后端逻辑
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3.6" data-path="user-center/default-address.html">
            
                
                    <a href="../../user-center/default-address.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.6.</b>
                        
                        设置默认地址
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3.7" data-path="user-center/update-address-title.html">
            
                
                    <a href="../../user-center/update-address-title.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.7.</b>
                        
                        修改地址标题
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="user-center/change-password.html">
            
                
                    <a href="../../user-center/change-password.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        修改密码
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="goods.html">
            
                
                    <a href="../../goods.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        商品
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1" data-path="goods/goods-db-tables-design.html">
            
                
                    <a href="../../goods/goods-db-tables-design.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.</b>
                        
                        商品数据库表设计
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.1.1" data-path="goods/goods-db-tables-design/spu-sku.html">
            
                
                    <a href="../../goods/goods-db-tables-design/spu-sku.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.1.</b>
                        
                        SPU和SKU
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.1.2" data-path="goods/goods-db-tables-design/contents-tables-analyze.html">
            
                
                    <a href="../../goods/goods-db-tables-design/contents-tables-analyze.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.2.</b>
                        
                        首页广告数据库表分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.1.3" data-path="goods/goods-db-tables-design/goods-data-tables-analyze.html">
            
                
                    <a href="../../goods/goods-db-tables-design/goods-data-tables-analyze.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.1.3.</b>
                        
                        商品信息数据库表分析
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="goods/prepare-goods-data.html">
            
                
                    <a href="../../goods/prepare-goods-data.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.</b>
                        
                        准备商品数据
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.2.1" data-path="goods/prepare-goods-data/fastdfs.html">
            
                
                    <a href="../../goods/prepare-goods-data/fastdfs.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.1.</b>
                        
                        文件存储方案FastDFS
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="6.2.2" data-path="goods/prepare-goods-data/docker-basics.html">
            
                
                    <a href="../../goods/prepare-goods-data/docker-basics.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.2.</b>
                        
                        容器化方案Docker
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2.3" data-path="goods/prepare-goods-data/implementation-file-storage-download.html">
            
                
                    <a href="../../goods/prepare-goods-data/implementation-file-storage-download.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.3.</b>
                        
                        Docker和FastDFS上传和下载文件
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.2.4" data-path="goods/prepare-goods-data/import-goods-data.html">
            
                
                    <a href="../../goods/prepare-goods-data/import-goods-data.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.2.4.</b>
                        
                        录入商品数据
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="goods/index.html">
            
                
                    <a href="../../goods/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.</b>
                        
                        首页广告
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.3.1" data-path="goods/index/show-channels-categories.html">
            
                
                    <a href="../../goods/index/show-channels-categories.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.1.</b>
                        
                        展示首页商品分类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3.2" data-path="goods/index/show-index-contents.html">
            
                
                    <a href="../../goods/index/show-index-contents.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.2.</b>
                        
                        展示首页商品广告
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.3.3" data-path="goods/prepare-goods-data/customstorage-tool.html">
            
                
                    <a href="../../goods/prepare-goods-data/customstorage-tool.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.3.3.</b>
                        
                        自定义Django文件存储类
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="goods/goods-list.html">
            
                
                    <a href="../../goods/goods-list.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.</b>
                        
                        商品列表页
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.4.1" data-path="goods/page-structure-analyze.html">
            
                
                    <a href="../../goods/page-structure-analyze.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.1.</b>
                        
                        商品列表页分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4.2" data-path="goods/goods-list/crumbs-nav.html">
            
                
                    <a href="../../goods/goods-list/crumbs-nav.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.2.</b>
                        
                        列表页面包屑导航
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4.3" data-path="goods/pagination-sort.html">
            
                
                    <a href="../../goods/pagination-sort.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.3.</b>
                        
                        列表页分页和排序
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.4.4" data-path="goods/sales-sort.html">
            
                
                    <a href="../../goods/sales-sort.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.4.4.</b>
                        
                        列表页热销排行
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="goods/goods-search.html">
            
                
                    <a href="../../goods/goods-search.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.</b>
                        
                        商品搜索
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.5.1" data-path="goods/goods-search/full-text-search-es.html">
            
                
                    <a href="../../goods/goods-search/full-text-search-es.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.1.</b>
                        
                        全文检索方案Elasticsearch
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.5.2" data-path="goods/goods-search/haystack-create-index.html">
            
                
                    <a href="../../goods/goods-search/haystack-create-index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.2.</b>
                        
                        Haystack扩展建立索引
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.5.3" data-path="goods/goods-search/render-search-result.html">
            
                
                    <a href="../../goods/goods-search/render-search-result.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.5.3.</b>
                        
                        渲染商品搜索结果
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.6" data-path="goods/detail.html">
            
                
                    <a href="../../goods/detail.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.</b>
                        
                        商品详情页
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.6.1" data-path="goods/detail/analyze-prepare.html">
            
                
                    <a href="../../goods/detail/analyze-prepare.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.1.</b>
                        
                        商品详情页分析和准备
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.6.2" data-path="goods/detail/show-detail-data.html">
            
                
                    <a href="../../goods/detail/show-detail-data.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.2.</b>
                        
                        展示详情页数据
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.6.3" data-path="goods/detail/statistics-category-goods-views-count.html">
            
                
                    <a href="../../goods/detail/statistics-category-goods-views-count.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.6.3.</b>
                        
                        统计分类商品访问量
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.7" data-path="goods/user-browse-history.html">
            
                
                    <a href="../../goods/user-browse-history.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.7.</b>
                        
                        用户浏览记录
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.7.1" data-path="goods/user-browse-history/browse-history-save-scheme.html">
            
                
                    <a href="../../goods/user-browse-history/browse-history-save-scheme.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.7.1.</b>
                        
                        设计浏览记录存储方案
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="6.7.2" data-path="goods/user-browse-history/save-query-browse-history.html">
            
                
                    <a href="../../goods/user-browse-history/save-query-browse-history.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.7.2.</b>
                        
                        保存和查询浏览记录
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7" data-path="carts.html">
            
                
                    <a href="../../carts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        购物车
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.1" data-path="carts/carts-save-scheme.html">
            
                
                    <a href="../../carts/carts-save-scheme.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.1.</b>
                        
                        购物车存储方案
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2" data-path="carts/carts-management.html">
            
                
                    <a href="../../carts/carts-management.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.</b>
                        
                        购物车管理
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="7.2.1" data-path="carts/addcarts.html">
            
                
                    <a href="../../carts/addcarts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.1.</b>
                        
                        添加购物车
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2.2" data-path="carts/query-carts.html">
            
                
                    <a href="../../carts/query-carts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.2.</b>
                        
                        展示购物车
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2.3" data-path="carts/update-carts.html">
            
                
                    <a href="../../carts/update-carts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.3.</b>
                        
                        修改购物车
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2.4" data-path="carts/delete-carts.html">
            
                
                    <a href="../../carts/delete-carts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.4.</b>
                        
                        删除购物车
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2.5" data-path="carts/all-select-carts.html">
            
                
                    <a href="../../carts/all-select-carts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.5.</b>
                        
                        全选购物车
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7.2.6" data-path="carts/merge-carts.html">
            
                
                    <a href="../../carts/merge-carts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.2.6.</b>
                        
                        合并购物车
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="7.3" data-path="carts/show-goods-page-carts.html">
            
                
                    <a href="../../carts/show-goods-page-carts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.3.</b>
                        
                        展示商品页面简单购物车
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8" data-path="orders.html">
            
                
                    <a href="../../orders.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        订单
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1" data-path="orders/settlement.html">
            
                
                    <a href="../../orders/settlement.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.1.</b>
                        
                        结算订单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.2" data-path="orders/commit.html">
            
                
                    <a href="../../orders/commit.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.</b>
                        
                        提交订单
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.2.1" data-path="orders/commit/createorders-tables.html">
            
                
                    <a href="../../orders/commit/createorders-tables.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.1.</b>
                        
                        创建订单数据库表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.2.2" data-path="orders/commit/save-orders-goods-info.html">
            
                
                    <a href="../../orders/commit/save-orders-goods-info.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.2.</b>
                        
                        保存订单基本信息和订单商品信息
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.2.3" data-path="orders/commit/transaction.html">
            
                
                    <a href="../../orders/commit/transaction.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.3.</b>
                        
                        使用事务保存订单数据
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.2.4" data-path="orders/commit/lock.html">
            
                
                    <a href="../../orders/commit/lock.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.4.</b>
                        
                        使用乐观锁并发下单
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.2.5" data-path="orders/commit/orders-success.html">
            
                
                    <a href="../../orders/commit/orders-success.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.5.</b>
                        
                        展示提交订单成功页面
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="8.3" data-path="orders/info.html">
            
                
                    <a href="../../orders/info.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.3.</b>
                        
                        我的订单
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="9" data-path="payment.html">
            
                
                    <a href="../../payment.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        支付
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1" data-path="payment/alipay-introduce.html">
            
                
                    <a href="../../payment/alipay-introduce.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.1.</b>
                        
                        支付宝介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.2" data-path="payment/alipay-payment-sys.html">
            
                
                    <a href="../../payment/alipay-payment-sys.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.2.</b>
                        
                        对接支付宝系统
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.2.1" data-path="payment/alipay-payment/order-payment-functions.html">
            
                
                    <a href="../../payment/alipay-payment/order-payment-functions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.2.1.</b>
                        
                        订单支付功能
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.2.2" data-path="payment/alipay-payment/save-payment-result.html">
            
                
                    <a href="../../payment/alipay-payment/save-payment-result.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.2.2.</b>
                        
                        保存订单支付结果
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="9.3" data-path="payment/comment-order-goods.html">
            
                
                    <a href="../../payment/comment-order-goods.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.3.</b>
                        
                        评价订单商品
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.3.1" data-path="payment/comment-order-goods/goods-judge-implementation.html">
            
                
                    <a href="../../payment/comment-order-goods/goods-judge-implementation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.3.1.</b>
                        
                        评价订单商品
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.3.2" data-path="payment/comment-order-goods/detail-show-goods-judge-info.html">
            
                
                    <a href="../../payment/comment-order-goods/detail-show-goods-judge-info.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.3.2.</b>
                        
                        详情页展示评价信息
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10" data-path="wpo.html">
            
                
                    <a href="../../wpo.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.</b>
                        
                        性能优化
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.1" data-path="wpo/html-static.html">
            
                
                    <a href="../../wpo/html-static.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.1.</b>
                        
                        页面静态化
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.1.1" data-path="wpo/html-static/static-html.html">
            
                
                    <a href="../../wpo/html-static/static-html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.1.1.</b>
                        
                        首页广告页面静态化
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="10.1.2" data-path="wpo/html-static/goods-detail-static.html">
            
                
                    <a href="../../wpo/html-static/goods-detail-static.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.1.2.</b>
                        
                        商品详情页面静态化
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10.2" data-path="wpo/mysql-read-write.html">
            
                
                    <a href="../../wpo/mysql-read-write.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.2.</b>
                        
                        MySQL读写分离
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="10.2.1" data-path="wpo/mysql-read-write/master-slave.html">
            
                
                    <a href="../../wpo/mysql-read-write/master-slave.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.2.1.</b>
                        
                        MySQL主从同步
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="10.2.2" data-path="wpo/mysql-read-write/django-db-read-write-separate.html">
            
                
                    <a href="../../wpo/mysql-read-write/django-db-read-write-separate.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.2.2.</b>
                        
                        Django实现MySQL读写分离
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="11" data-path="deploy.html">
            
                
                    <a href="../../deploy.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.</b>
                        
                        部署
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="11.1" data-path="deploy/nginx-static-logic.html">
            
                
                    <a href="../../deploy/nginx-static-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.1.</b>
                        
                        Nginx部署静态数据
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="11.2" data-path="deploy/nginx-reverse-proxy-logic.html">
            
                
                    <a href="../../deploy/nginx-reverse-proxy-logic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>11.2.</b>
                        
                        Nginx反向代理动态业务
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >美多商城</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h1 id="&#x5BB9;&#x5668;&#x5316;&#x65B9;&#x6848;docker">&#x5BB9;&#x5668;&#x5316;&#x65B9;&#x6848;Docker</h1>
<blockquote>
<p>&#x601D;&#x8003;&#xFF1A;</p>
<ul>
<li>FastDFS&#x7684;&#x5B89;&#x88C5;&#x6B65;&#x9AA4;&#x975E;&#x5E38;&#x7684;&#x591A;&#xFF0C;&#x6D89;&#x53CA;&#x7684;&#x4F9D;&#x8D56;&#x5305;&#x4E5F;&#x5F88;&#x591A;&#xFF0C;&#x5F53;&#x65B0;&#x7684;&#x673A;&#x5668;&#x9700;&#x8981;&#x5B89;&#x88C5;FastDFS&#x65F6;&#xFF0C;&#x662F;&#x5426;&#x9700;&#x8981;&#x4ECE;&#x5934;&#x5F00;&#x59CB;&#x5B89;&#x88C5;&#x3002;</li>
<li>&#x6211;&#x4EEC;&#x5728;&#x5B66;&#x4E60;&#x65F6;&#x62FF;&#x5230;ubuntu&#x7CFB;&#x7EDF;&#x7684;&#x955C;&#x50CF;&#xFF0C;&#x5728;VM&#x865A;&#x62DF;&#x673A;&#x4E2D;&#x8FD0;&#x884C;&#x8FD9;&#x4E2A;&#x955C;&#x50CF;&#x540E;&#xFF0C;&#x4E3A;&#x4EC0;&#x4E48;&#x5C31;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x8FDB;&#x884C;&#x5F00;&#x53D1;&#xFF0C;&#x800C;&#x4E0D;&#x9700;&#x8981;&#x91CD;&#x65B0;&#x642D;&#x5EFA;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x3002;</li>
<li>&#x5728;&#x5DE5;&#x4F5C;&#x4E2D;&#xFF0C;&#x5982;&#x4F55;&#x9AD8;&#x6548;&#x7684;&#x4FDD;&#x8BC1;&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x5199;&#x4EE3;&#x7801;&#x7684;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x4E0E;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x8981;&#x90E8;&#x7F72;&#x7684;&#x751F;&#x4EA7;&#x73AF;&#x5883;&#x4E00;&#x81F4;&#x6027;&#x3002;&#x5982;&#x679C;&#x8981;&#x90E8;&#x7F72;&#x4E00;&#x53F0;&#x65B0;&#x7684;&#x673A;&#x5668;&#xFF0C;&#x662F;&#x5426;&#x9700;&#x8981;&#x4ECE;&#x5934;&#x5F00;&#x59CB;&#x90E8;&#x7F72;&#x3002;</li>
</ul>
<p>&#x7ED3;&#x8BBA;&#xFF1A;</p>
<ul>
<li>&#x4E0A;&#x8FF0;&#x601D;&#x8003;&#x7684;&#x95EE;&#x9898;&#xFF0C;&#x90FD;&#x6D89;&#x53CA;&#x5230;<strong>&#x76F8;&#x540C;&#x7684;&#x5DE5;&#x4F5C;&#x662F;&#x5426;&#x9700;&#x8981;&#x91CD;&#x590D;&#x505A;</strong>&#x3002;</li>
<li>&#x907F;&#x514D;&#x76F8;&#x540C;&#x7684;&#x5DE5;&#x4F5C;&#x91CD;&#x590D;&#x505A;&#x662F;&#x5BB9;&#x5668;&#x5316;&#x6280;&#x672F;&#x5E94;&#x7528;&#x4E4B;&#x4E00;&#x3002;</li>
</ul>
<p>&#x5BB9;&#x5668;&#x5316;&#x65B9;&#x6848;:</p>
<ul>
<li><strong>Docker</strong></li>
<li>Docker&#x7684;&#x76EE;&#x6807;&#x4E4B;&#x4E00;&#x5C31;&#x662F;&#x7F29;&#x77ED;&#x4EE3;&#x7801;&#x4ECE;&#x5F00;&#x53D1;&#x3001;&#x6D4B;&#x8BD5;&#x5230;&#x90E8;&#x7F72;&#x3001;&#x4E0A;&#x7EBF;&#x8FD0;&#x884C;&#x7684;&#x5468;&#x671F;&#xFF0C;&#x8BA9;&#x6211;&#x4EEC;&#x7684;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x5177;&#x5907;&#x53EF;&#x79FB;&#x690D;&#x6027;&#x3001;&#x6613;&#x4E8E;&#x6784;&#x5EFA;&#x3001;&#x5E76;&#x6613;&#x4E8E;&#x534F;&#x4F5C;&#x3002;</li>
</ul>
</blockquote>
<h3 id="1-docker&#x4ECB;&#x7ECD;">1. Docker&#x4ECB;&#x7ECD;</h3>
<ul>
<li><a href="http://www.docker.org.cn/index.html" target="_blank">Docker&#x4E2D;&#x6587;&#x793E;&#x533A;&#x6587;&#x6863;</a></li>
<li>Docker &#x662F;&#x4E00;&#x4E2A;&#x5F00;&#x6E90;&#x7684;&#x8F6F;&#x4EF6;&#x90E8;&#x7F72;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#x3002;</li>
<li>Docker &#x4E5F;&#x662F;&#x8F7B;&#x91CF;&#x7EA7;&#x7684;&#x5E94;&#x7528;&#x5BB9;&#x5668;&#x6846;&#x67B6;&#x3002;</li>
<li>Docker &#x53EF;&#x4EE5;&#x6253;&#x5305;&#x3001;&#x53D1;&#x5E03;&#x3001;&#x8FD0;&#x884C;&#x4EFB;&#x4F55;&#x7684;&#x5E94;&#x7528;&#x3002;</li>
<li>Docker &#x5C31;&#x50CF;&#x4E00;&#x4E2A;&#x76D2;&#x5B50;&#xFF0C;&#x91CC;&#x9762;&#x53EF;&#x4EE5;&#x88C5;&#x5F88;&#x591A;&#x7269;&#x4EF6;&#xFF0C;&#x5982;&#x679C;&#x9700;&#x8981;&#x67D0;&#x4E9B;&#x7269;&#x4EF6;&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x5C06;&#x8BE5;&#x76D2;&#x5B50;&#x62FF;&#x8D70;&#xFF0C;&#x800C;&#x4E0D;&#x9700;&#x8981;&#x4ECE;&#x8BE5;&#x76D2;&#x5B50;&#x4E2D;&#x4E00;&#x4EF6;&#x4E00;&#x4EF6;&#x7684;&#x53D6;&#x3002;</li>
<li>Docker &#x662F;&#x4E00;&#x4E2A;<code>&#x5BA2;&#x6237;&#x7AEF;-&#x670D;&#x52A1;&#x7AEF;(C/S)</code>&#x67B6;&#x6784;&#x7A0B;&#x5E8F;&#x3002;<ul>
<li>&#x5BA2;&#x6237;&#x7AEF;&#x53EA;&#x9700;&#x8981;&#x5411;&#x670D;&#x52A1;&#x7AEF;&#x53D1;&#x51FA;&#x8BF7;&#x6C42;&#xFF0C;&#x670D;&#x52A1;&#x7AEF;&#x5904;&#x7406;&#x5B8C;&#x8BF7;&#x6C42;&#x540E;&#x4F1A;&#x8FD4;&#x56DE;&#x7ED3;&#x679C;&#x3002;</li>
</ul>
</li>
</ul>
<blockquote>
<p>Docker &#x5305;&#x62EC;&#x4E09;&#x4E2A;&#x57FA;&#x672C;&#x6982;&#x5FF5;:</p>
</blockquote>
<ul>
<li><p>&#x955C;&#x50CF;&#xFF08;Image&#xFF09;</p>
<ul>
<li>Docker&#x7684;&#x955C;&#x50CF;&#x6982;&#x5FF5;&#x7C7B;&#x4F3C;&#x4E8E;&#x865A;&#x62DF;&#x673A;&#x91CC;&#x7684;&#x955C;&#x50CF;&#xFF0C;&#x662F;&#x4E00;&#x4E2A;&#x53EA;&#x8BFB;&#x7684;&#x6A21;&#x677F;&#xFF0C;&#x4E00;&#x4E2A;&#x72EC;&#x7ACB;&#x7684;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#xFF0C;&#x5305;&#x62EC;&#x8FD0;&#x884C;&#x5BB9;&#x5668;&#x6240;&#x9700;&#x7684;&#x6570;&#x636E;&#xFF0C;&#x53EF;&#x4EE5;&#x7528;&#x6765;&#x521B;&#x5EFA;&#x65B0;&#x7684;&#x5BB9;&#x5668;&#x3002;</li>
<li>&#x4F8B;&#x5982;&#xFF1A;&#x4E00;&#x4E2A;&#x955C;&#x50CF;&#x53EF;&#x4EE5;&#x5305;&#x542B;&#x4E00;&#x4E2A;&#x5B8C;&#x6574;&#x7684; ubuntu &#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x73AF;&#x5883;&#xFF0C;&#x91CC;&#x9762;&#x4EC5;&#x5B89;&#x88C5;&#x4E86;MySQL&#x6216;&#x7528;&#x6237;&#x9700;&#x8981;&#x7684;&#x5176;&#x5B83;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x3002;</li>
</ul>
</li>
<li><p>&#x5BB9;&#x5668;&#xFF08;Container&#xFF09;</p>
<ul>
<li>Docker&#x5BB9;&#x5668;&#x662F;&#x7531;Docker&#x955C;&#x50CF;&#x521B;&#x5EFA;&#x7684;&#x8FD0;&#x884C;&#x5B9E;&#x4F8B;&#xFF0C;&#x7C7B;&#x4F3C;VM&#x865A;&#x62DF;&#x673A;&#xFF0C;&#x652F;&#x6301;&#x542F;&#x52A8;&#xFF0C;&#x505C;&#x6B62;&#xFF0C;&#x5220;&#x9664;&#x7B49;&#x3002;</li>
<li>&#x6BCF;&#x4E2A;&#x5BB9;&#x5668;&#x95F4;&#x662F;&#x76F8;&#x4E92;&#x9694;&#x79BB;&#x7684;&#xFF0C;&#x5BB9;&#x5668;&#x4E2D;&#x4F1A;&#x8FD0;&#x884C;&#x7279;&#x5B9A;&#x7684;&#x5E94;&#x7528;&#xFF0C;&#x5305;&#x542B;&#x7279;&#x5B9A;&#x5E94;&#x7528;&#x7684;&#x4EE3;&#x7801;&#x53CA;&#x6240;&#x9700;&#x7684;&#x4F9D;&#x8D56;&#x6587;&#x4EF6;&#x3002;</li>
</ul>
</li>
<li><p><a href="https://hub.docker.com/" target="_blank">&#x4ED3;&#x5E93;&#xFF08;Repository&#xFF09;</a></p>
<ul>
<li>Docker&#x7684;&#x4ED3;&#x5E93;&#x7C7B;&#x4F3C;Github&#x4E00;&#x6837;&#x7684;&#xFF0C;&#x7528;&#x4E8E;&#x6258;&#x7BA1;&#x955C;&#x50CF;&#x7684;&#x3002;</li>
</ul>
</li>
</ul>
<h3 id="2-docker&#x5B89;&#x88C5;&#xFF08;ubuntu-1604&#xFF09;">2. Docker&#x5B89;&#x88C5;&#xFF08;ubuntu 16.04&#xFF09;</h3>
<blockquote>
<p><strong>1.&#x6E90;&#x7801;&#x5B89;&#x88C5;Docker CE</strong></p>
</blockquote>
<pre><code class="lang-bash">$ <span class="hljs-built_in">cd</span> docker&#x6E90;&#x7801;&#x76EE;&#x5F55;
$ sudo apt-key add gpg
$ sudo dpkg -i docker-ce_17.<span class="hljs-number">03.2</span>~ce-<span class="hljs-number">0</span>~ubuntu-xenial_amd64.deb
</code></pre>
<p><img src="../images/13&#x6E90;&#x7801;&#x5B89;&#x88C5;docker.png" style="zoom:35%"></p>
<blockquote>
<p><strong>2.&#x68C0;&#x67E5;Docker CE&#x662F;&#x5426;&#x5B89;&#x88C5;&#x6B63;&#x786E;</strong></p>
</blockquote>
<pre><code class="lang-bash">$ sudo docker run hello-world
</code></pre>
<p>&#x51FA;&#x73B0;&#x5982;&#x4E0B;&#x4FE1;&#x606F;&#xFF0C;&#x8868;&#x793A;&#x5B89;&#x88C5;&#x6210;&#x529F;</p>
<p><img src="../images/14&#x68C0;&#x6D4B;docker&#x662F;&#x5426;&#x5B89;&#x88C5;&#x6210;&#x529F;.png" style="zoom:35%"></p>
<blockquote>
<p><strong>3.&#x542F;&#x52A8;&#x4E0E;&#x505C;&#x6B62;</strong></p>
<ul>
<li>&#x5B89;&#x88C5;&#x5B8C;&#x6210;Docker&#x540E;&#xFF0C;&#x9ED8;&#x8BA4;&#x5DF2;&#x7ECF;&#x542F;&#x52A8;&#x4E86;docker&#x670D;&#x52A1;&#x3002;</li>
</ul>
</blockquote>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x542F;&#x52A8;docker</span>
$ sudo service docker start
<span class="hljs-comment"># &#x91CD;&#x542F;docker</span>
$ sudo service docker restart
<span class="hljs-comment"># &#x505C;&#x6B62;docker</span>
$ sudo service docker stop
</code></pre>
<h3 id="3-docker&#x955C;&#x50CF;&#x64CD;&#x4F5C;">3. Docker&#x955C;&#x50CF;&#x64CD;&#x4F5C;</h3>
<blockquote>
<p><strong>1.&#x955C;&#x50CF;&#x5217;&#x8868;</strong></p>
</blockquote>
<pre><code class="lang-bash">$ sudo docker image ls
</code></pre>
<p><img src="../images/15&#x955C;&#x50CF;&#x5217;&#x8868;1.png" style="zoom:50%"></p>
<pre><code>* REPOSITORY&#xFF1A;&#x955C;&#x50CF;&#x6240;&#x5728;&#x7684;&#x4ED3;&#x5E93;&#x540D;&#x79F0; 
* TAG&#xFF1A;&#x955C;&#x50CF;&#x6807;&#x7B7E; 
* IMAGEID&#xFF1A;&#x955C;&#x50CF;ID 
* CREATED&#xFF1A;&#x955C;&#x50CF;&#x7684;&#x521B;&#x5EFA;&#x65E5;&#x671F;(&#x4E0D;&#x662F;&#x83B7;&#x53D6;&#x8BE5;&#x955C;&#x50CF;&#x7684;&#x65E5;&#x671F;) 
* SIZE&#xFF1A;&#x955C;&#x50CF;&#x5927;&#x5C0F;
</code></pre><blockquote>
<p><strong>2.&#x4ECE;&#x4ED3;&#x5E93;&#x62C9;&#x53D6;&#x955C;&#x50CF;</strong></p>
</blockquote>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x5B98;&#x65B9;&#x955C;&#x50CF;</span>
$ sudo docker image pull &#x955C;&#x50CF;&#x540D;&#x79F0; &#x6216;&#x8005; sudo docker image pull library/&#x955C;&#x50CF;&#x540D;&#x79F0;
$ sudo docker image pull ubuntu &#x6216;&#x8005; sudo docker image pull library/ubuntu
$ sudo docker image pull ubuntu:<span class="hljs-number">16.04</span> &#x6216;&#x8005; sudo docker image pull library/ubuntu:<span class="hljs-number">16.04</span>

<span class="hljs-comment"># &#x4E2A;&#x4EBA;&#x955C;&#x50CF;</span>
$ sudo docker image pull &#x4ED3;&#x5E93;&#x540D;&#x79F0;/&#x955C;&#x50CF;&#x540D;&#x79F0;
$ sudo docker image pull itcast/fastdfs
</code></pre>
<p><img src="../images/16&#x62C9;&#x53D6;&#x955C;&#x50CF;ubuntu.png" style="zoom:50%"> 
<img src="../images/16&#x62C9;&#x53D6;&#x955C;&#x50CF;fdfs.png" style="zoom:50%"> 
<img src="../images/15&#x955C;&#x50CF;&#x5217;&#x8868;2.png" style="zoom:50%"> </p>
<blockquote>
<p><strong>3.&#x5220;&#x9664;&#x955C;&#x50CF;</strong></p>
</blockquote>
<pre><code class="lang-bash">$ sudo docker image rm &#x955C;&#x50CF;&#x540D;&#x6216;&#x955C;&#x50CF;ID
$ sudo docker image rm hello-world
$ sudo docker image rm fce289e99eb9
</code></pre>
<p><img src="../images/17&#x5220;&#x9664;&#x955C;&#x50CF;.png" style="zoom:50%"> </p>
<h3 id="4-docker&#x5BB9;&#x5668;&#x64CD;&#x4F5C;">4. Docker&#x5BB9;&#x5668;&#x64CD;&#x4F5C;</h3>
<blockquote>
<p><strong>1.&#x5BB9;&#x5668;&#x5217;&#x8868;</strong></p>
</blockquote>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x67E5;&#x770B;&#x6B63;&#x5728;&#x8FD0;&#x884C;&#x7684;&#x5BB9;&#x5668;</span>
$ sudo docker container ls
<span class="hljs-comment"># &#x67E5;&#x770B;&#x6240;&#x6709;&#x7684;&#x5BB9;&#x5668;</span>
$ sudo docker container ls --all
</code></pre>
<p><img src="../images/18&#x5BB9;&#x5668;&#x5217;&#x8868;.png" style="zoom:50%"> </p>
<blockquote>
<p><strong>2.&#x521B;&#x5EFA;&#x5BB9;&#x5668;</strong></p>
</blockquote>
<pre><code class="lang-bash">$ sudo docker run [option] &#x955C;&#x50CF;&#x540D; [&#x5411;&#x542F;&#x52A8;&#x5BB9;&#x5668;&#x4E2D;&#x4F20;&#x5165;&#x7684;&#x547D;&#x4EE4;]
</code></pre>
<pre><code>&#x5E38;&#x7528;&#x53EF;&#x9009;&#x53C2;&#x6570;&#x8BF4;&#x660E;&#xFF1A;
* -i &#x8868;&#x793A;&#x4EE5;&#x300A;&#x4EA4;&#x4E92;&#x6A21;&#x5F0F;&#x300B;&#x8FD0;&#x884C;&#x5BB9;&#x5668;&#x3002;
* -t &#x8868;&#x793A;&#x5BB9;&#x5668;&#x542F;&#x52A8;&#x540E;&#x4F1A;&#x8FDB;&#x5165;&#x5176;&#x547D;&#x4EE4;&#x884C;&#x3002;&#x52A0;&#x5165;&#x8FD9;&#x4E24;&#x4E2A;&#x53C2;&#x6570;&#x540E;&#xFF0C;&#x5BB9;&#x5668;&#x521B;&#x5EFA;&#x5C31;&#x80FD;&#x767B;&#x5F55;&#x8FDB;&#x53BB;&#x3002;&#x5373;&#x5206;&#x914D;&#x4E00;&#x4E2A;&#x4F2A;&#x7EC8;&#x7AEF;&#x3002;
* --name &#x4E3A;&#x521B;&#x5EFA;&#x7684;&#x5BB9;&#x5668;&#x547D;&#x540D;&#x3002;
* -v &#x8868;&#x793A;&#x76EE;&#x5F55;&#x6620;&#x5C04;&#x5173;&#x7CFB;&#xFF0C;&#x5373;&#x5BBF;&#x4E3B;&#x673A;&#x76EE;&#x5F55;:&#x5BB9;&#x5668;&#x4E2D;&#x76EE;&#x5F55;&#x3002;&#x6CE8;&#x610F;:&#x6700;&#x597D;&#x505A;&#x76EE;&#x5F55;&#x6620;&#x5C04;&#xFF0C;&#x5728;&#x5BBF;&#x4E3B;&#x673A;&#x4E0A;&#x505A;&#x4FEE;&#x6539;&#xFF0C;&#x7136;&#x540E;&#x5171;&#x4EAB;&#x5230;&#x5BB9;&#x5668;&#x4E0A;&#x3002; 
* -d &#x4F1A;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x5B88;&#x62A4;&#x5F0F;&#x5BB9;&#x5668;&#x5728;&#x540E;&#x53F0;&#x8FD0;&#x884C;(&#x8FD9;&#x6837;&#x521B;&#x5EFA;&#x5BB9;&#x5668;&#x540E;&#x4E0D;&#x4F1A;&#x81EA;&#x52A8;&#x767B;&#x5F55;&#x5BB9;&#x5668;)&#x3002; 
* -p &#x8868;&#x793A;&#x7AEF;&#x53E3;&#x6620;&#x5C04;&#xFF0C;&#x5373;&#x5BBF;&#x4E3B;&#x673A;&#x7AEF;&#x53E3;:&#x5BB9;&#x5668;&#x4E2D;&#x7AEF;&#x53E3;&#x3002;
* --network=host &#x8868;&#x793A;&#x5C06;&#x4E3B;&#x673A;&#x7684;&#x7F51;&#x7EDC;&#x73AF;&#x5883;&#x6620;&#x5C04;&#x5230;&#x5BB9;&#x5668;&#x4E2D;&#xFF0C;&#x4F7F;&#x5BB9;&#x5668;&#x7684;&#x7F51;&#x7EDC;&#x4E0E;&#x4E3B;&#x673A;&#x76F8;&#x540C;&#x3002;
</code></pre><blockquote>
<p><strong>3.&#x4EA4;&#x4E92;&#x5F0F;&#x5BB9;&#x5668;</strong></p>
</blockquote>
<pre><code class="lang-bash">$ sudo docker run -it --name=ubuntu1 ubuntu /bin/bash
</code></pre>
<p><img src="../images/19&#x4EA4;&#x4E92;&#x5F0F;&#x5BB9;&#x5668;.png" style="zoom:50%">
<img src="../images/20&#x67E5;&#x770B;ubuntu1.png" style="zoom:50%"></p>
<pre><code>&#x5728;&#x5BB9;&#x5668;&#x4E2D;&#x53EF;&#x4EE5;&#x968F;&#x610F;&#x6267;&#x884C;linux&#x547D;&#x4EE4;&#xFF0C;&#x5C31;&#x662F;&#x4E00;&#x4E2A;ubuntu&#x7684;&#x73AF;&#x5883;&#x3002;
&#x5F53;&#x6267;&#x884C; exit &#x547D;&#x4EE4;&#x9000;&#x51FA;&#x65F6;&#xFF0C;&#x8BE5;&#x5BB9;&#x5668;&#x968F;&#x4E4B;&#x505C;&#x6B62;&#x3002;
</code></pre><blockquote>
<p><strong>4.&#x5B88;&#x62A4;&#x5F0F;&#x5BB9;&#x5668;</strong></p>
</blockquote>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x5F00;&#x542F;&#x5B88;&#x62A4;&#x5F0F;&#x5BB9;&#x5668;</span>
$ sudo docker run -dit --name=ubuntu2 ubuntu
</code></pre>
<p><img src="../images/21&#x5B88;&#x62A4;&#x5F0F;&#x5BB9;&#x5668;.png" style="zoom:50%"></p>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x8FDB;&#x5165;&#x5230;&#x5BB9;&#x5668;&#x5185;&#x90E8;&#x4EA4;&#x4E92;&#x73AF;&#x5883;</span>
$ sudo docker <span class="hljs-built_in">exec</span> -it &#x5BB9;&#x5668;&#x540D;&#x6216;&#x5BB9;&#x5668;id &#x8FDB;&#x5165;&#x540E;&#x6267;&#x884C;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x547D;&#x4EE4;
$ sudo docker <span class="hljs-built_in">exec</span> -it ubuntu2 /bin/bash
</code></pre>
<p><img src="../images/22&#x8FDB;&#x5165;&#x5B88;&#x62A4;&#x5F0F;&#x5BB9;&#x5668;.png" style="zoom:50%"> </p>
<pre><code>&#x5982;&#x679C;&#x5BF9;&#x4E8E;&#x4E00;&#x4E2A;&#x9700;&#x8981;&#x957F;&#x671F;&#x8FD0;&#x884C;&#x7684;&#x5BB9;&#x5668;&#x6765;&#x8BF4;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x5B88;&#x62A4;&#x5F0F;&#x5BB9;&#x5668;&#x3002;
&#x5728;&#x5BB9;&#x5668;&#x5185;&#x90E8;&#x6267;&#x884C; exit &#x547D;&#x4EE4;&#x9000;&#x51FA;&#x65F6;&#xFF0C;&#x8BE5;&#x5BB9;&#x5668;&#x4E5F;&#x968F;&#x4E4B;&#x505C;&#x6B62;&#x3002;
</code></pre><blockquote>
<p><strong>5.&#x505C;&#x6B62;&#x548C;&#x542F;&#x52A8;&#x5BB9;&#x5668;</strong></p>
</blockquote>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x505C;&#x6B62;&#x5BB9;&#x5668;</span>
$ sudo docker container stop &#x5BB9;&#x5668;&#x540D;&#x6216;&#x5BB9;&#x5668;id
<span class="hljs-comment"># kill&#x6389;&#x5BB9;&#x5668;</span>
$ sudo docker container <span class="hljs-built_in">kill</span> &#x5BB9;&#x5668;&#x540D;&#x6216;&#x5BB9;&#x5668;id
<span class="hljs-comment"># &#x542F;&#x52A8;&#x5BB9;&#x5668;</span>
$ sudo docker container start &#x5BB9;&#x5668;&#x540D;&#x6216;&#x5BB9;&#x5668;id
</code></pre>
<p><img src="../images/23&#x505C;&#x6B62;&#x548C;&#x542F;&#x52A8;&#x5BB9;&#x5668;.png" style="zoom:35%"></p>
<blockquote>
<p><strong>6.&#x5220;&#x9664;&#x5BB9;&#x5668;</strong></p>
<ul>
<li>&#x6B63;&#x5728;&#x8FD0;&#x884C;&#x7684;&#x5BB9;&#x5668;&#x65E0;&#x6CD5;&#x76F4;&#x63A5;&#x5220;&#x9664;&#x3002;</li>
</ul>
</blockquote>
<pre><code class="lang-bash">$ sudo docker container rm &#x5BB9;&#x5668;&#x540D;&#x6216;&#x5BB9;&#x5668;id
</code></pre>
<p><img src="../images/24&#x5220;&#x9664;&#x5BB9;&#x5668;.png" style="zoom:50%"></p>
<blockquote>
<p><strong>7.&#x5BB9;&#x5668;&#x5236;&#x4F5C;&#x6210;&#x955C;&#x50CF;</strong></p>
<ul>
<li>&#x4E3A;&#x4FDD;&#x8BC1;&#x5DF2;&#x7ECF;&#x914D;&#x7F6E;&#x5B8C;&#x6210;&#x7684;&#x73AF;&#x5883;&#x53EF;&#x4EE5;&#x91CD;&#x590D;&#x5229;&#x7528;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5C06;&#x5BB9;&#x5668;&#x5236;&#x4F5C;&#x6210;&#x955C;&#x50CF;&#x3002;</li>
</ul>
</blockquote>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x5C06;&#x5BB9;&#x5668;&#x5236;&#x4F5C;&#x6210;&#x955C;&#x50CF;</span>
$ sudo docker commit &#x5BB9;&#x5668;&#x540D; &#x955C;&#x50CF;&#x540D;
</code></pre>
<p><img src="../images/25&#x5BB9;&#x5668;&#x5236;&#x4F5C;&#x6210;&#x955C;&#x50CF;.png" style="zoom:40%"></p>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x955C;&#x50CF;&#x6253;&#x5305;&#x5907;&#x4EFD;</span>
$ sudo docker save -o &#x4FDD;&#x5B58;&#x7684;&#x6587;&#x4EF6;&#x540D; &#x955C;&#x50CF;&#x540D;
</code></pre>
<p><img src="../images/26&#x955C;&#x50CF;&#x6253;&#x5305;&#x5907;&#x4EFD;.png" style="zoom:50%"></p>
<pre><code class="lang-bash"><span class="hljs-comment"># &#x955C;&#x50CF;&#x89E3;&#x538B;</span>
$ sudo docker load -i &#x6587;&#x4EF6;&#x8DEF;&#x5F84;/&#x5907;&#x4EFD;&#x6587;&#x4EF6;
</code></pre>
<p><img src="../images/27&#x955C;&#x50CF;&#x89E3;&#x538B;.png" style="zoom:35%"></p>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../goods/prepare-goods-data/fastdfs.html" class="navigation navigation-prev " aria-label="Previous page: 文件存储方案FastDFS"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../goods/prepare-goods-data/implementation-file-storage-download.html" class="navigation navigation-next " aria-label="Next page: Docker和FastDFS上传和下载文件"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"toggle-chapters":{},"expandable-chapters":{},"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book 美多商城 -->
</html>
